use std::{env, fs};

// mod formatter;
// mod lexer;
mod llvm_ir_gen;
// mod parser;
// mod position;
// mod rust_mir_gen;
// mod sem_table;
// mod semantic_analyze;

fn main() {
    let args: Vec<String> = env::args().collect();

    if args.len() < 3 {
        eprintln!("Usage: {} <filename> <outfilename>", args[0]);
        std::process::exit(1);
    }

    let filename = &args[1];
    let outfilename = &args[2];

    let input = fs::read_to_string(filename).expect("Failed to read file");
    llvm_ir_gen::ir_gen(&input, outfilename);
}
